//
//  TTMusicMusicGuanSecondCell.m
//  TTMusic
//
//  Created by 马金晖 on 16/3/31.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import "TTMusicMusicGuanSecondCell.h"
#import "UIImageView+WebCache.h"


@implementation TTMusicMusicGuanSecondCell

-(instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame: frame];
    
    if (self) {
        
        self.imageViewl = [[UIImageView alloc]initWithFrame:CGRectZero];
        
        [self.contentView addSubview:self.imageViewl];
        
        self.titleLabel = [[UILabel alloc]initWithFrame:CGRectZero];
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        
        self.titleLabel.alpha = 18;
        
        self.titleLabel.textColor = [UIColor whiteColor];
        
        [self.contentView addSubview:self.titleLabel];
        
        self.logoLabel = [[UILabel alloc]initWithFrame:CGRectZero];
        
        self.logoLabel.textAlignment = NSTextAlignmentCenter;
        self.logoLabel.alpha = 18;
        self.logoLabel.textColor = [UIColor blackColor];
        
        [self.contentView addSubview:self.logoLabel];
        
        self.imageViewplay = [[UIImageView alloc]initWithFrame:CGRectZero];
        [self.contentView addSubview:self.imageViewplay];
        
        
    }
    return self;
}

-(void)layoutSubviews {
    
    
    self.imageViewl.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
    self.titleLabel.frame = CGRectMake(0, self.bounds.size.height  - 30, self.bounds.size.width, 20);
    self.logoLabel.frame = CGRectMake(0, self.bounds.size.height - 50, self.bounds.size.width, 20);
    self.imageViewplay.frame = CGRectMake(self.bounds.size.width * 0.4, self.bounds.size.height * 0.4, self.bounds.size.width * 0.2, self.bounds.size.height * 0.2);
    
    
}
-(void)setTuijianFirstModel:(TuiJianFirstModel *)tuijianFirstModel {
    
    _tuijianFirstModel = tuijianFirstModel;
    
    self.titleLabel.text = tuijianFirstModel.name;
    
    self.logoLabel.text = tuijianFirstModel.singerName;
    
    [self.imageViewl sd_setImageWithURL:[NSURL URLWithString:tuijianFirstModel.picUrl]];
    
}

@end
